Prizm Content Connect
How to Configure JSP Samples

This topic contains steps for how to install on Linux and Windows.

Installing JSP on Linux

Note that JDK 1.7 and JRE 1.7+ are required.
  1. Install Prizm Content Connect for Linux and verify the service is working correctly. The installation will place the installable JSP sample in the following directory: /usr/share/prizm/Samples/jsp.
  1. After installation is complete, launch Tomcat Manager:

  1. In the WAR file to deploy section, select Choose File.
  2. Select the PCCSample.war file from this location /usr/share/prizm/Samples/jsp/target and click Deploy. The JSP sample will now be running on your Tomcat server. The installation directory is /var/lib/tomcat7/webapps/PCCSample.
  3. Give read/write permissions to the Documents folder and the Markups folder. Give read permissions to the ImageStamp folder. These folders are installed to /usr/share/prizm/Samples/ on Linux. For more information, see the "Configuration with web.xml" section below. 

Installing JSP on Apache Tomcat 7.0 on Windows Server

  1. Begin the installation of Prizm Content Connect for Windows.
  2. After installation is complete, launch Tomcat Manager.
  3. Click Browse.
  4. Select PCCSample.war file to upload from this location C:\Prizm\Samples\jsp\target and click Deploy.

  5. Prizm Services web tier will be deployed under C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps.

Overview of Samples

From the splash page you have two options:

  1. Choice of viewer:
  1. Select a sample document -OR- upload a document:

Full Viewer

Book Reader

  • If you select Book Reader on the splash page, then documents will be viewed with the book reader. The book reader demonstrates how the PCC viewer can be heavily customized:

JSP Directory Structure

The jsp samples are installed under /usr/share/prizm/Samples/jsp. This folder contains 3 sub-folders, one folder for each of the two samples (book-reader-sample and full-viewer-sample) and one folder for the splash page:

Each of the sample folders are completely self-contained, meaning that they contain all of the files needed to run the sample. Furthermore, with the exception of a few project files and build files, the sample folders contain only the files needed to run the sample.

Folder contents: common

File / Folder

Description

src\com\accusoft\pccis\sample\core src\com\accusoft\pccis\sample\html5

Contains the supporting classes for the RESTful communication between the viewer and web server. While the code for the functions can be modified as needed, modifications should be done with care. Most of the current web server RESTful interface passes the request onto Prizm Services.

WEB-INF/web.xml

Contains web tier settings.

Folder contents: full-viewer-sample

File / Folder

Description

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the viewer.

viewer-assets/less folder

Contains less that can be used to build the viewer CSS. This folder is non-essential, and does not need to be re-distributed.

viewer-assets/Gruntfile.js

Contains Grunt tasks to build the viewer less. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less.

viewer-webtier folder

Contains files that implement the jsp layer of communication between the client-side viewer and the PCC backend services.

viewer-webtier/pcc.jsp

File that defines and links the required Prizm RESTful interface to the files in the src folder. The client side Viewer JavaScript object will use this RESTful interface as described in PCC RESTful API.

index.jsp

The default page for the sample. The HTML5 viewer’s code gets loaded by this page.

predefinedSearch.json

This data file contains information defining search queries that will appear as selectable items in the full viewer.

Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the predefined search terms are provided as a JavaScript hash, when the viewer is created.

redactionReason.json

This data file contains information defining redaction reasons that are available in the viewer.

 

Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the redaction reasons are provided as a JavaScript hash, when the viewer is created.

Folder contents: book-reader-sample

File / Folder

Description

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the book reader viewer.

viewer-assets/less folder

Contains less that can be used to build the viewer CSS. This folder is non-essential, and does not need to be re-distributed.

viewer-assets/Gruntfile.js

Contains Grunt tasks to build the viewer less. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less.

viewer-assets/selection.json

A file used by the IcoMoon application to generate the icons in the book reader viewer.  If you need to add an icon to the viewer, you can add the icon to this file and use the IcoMoon application (https://icomoon.io) to generate a new icon font. This file is non-essential and does not need to be re-distributed.

viewer-webtier folder

Contains files that implement the jsp layer of communication between the client-side book reader viewer and the PCC backend services.

viewer-webtier/createSession.jsp

This file is used by index.jsp to create a PCC Viewing Session with the PCC RESTful API.

viewer-webtier/pcc.jsp

File that defines and links the required Prizm RESTful interface to the files in the src folder. The client side Viewer JavaScript object will use this RESTful interface as described in PCC RESTful API.

WEB-INF/web.xml

Contains web tier settings.

index.html

The default page for the sample. This page calls the createSession.jsp service to start a viewing session with the PCC RESTful services and then the page loads the book reader.

sample-config.js

Contains references to the assets, web tier, and language files used by the viewer in this sample.

Configuration with web.xml for Linux

The file web.xml is used to configure the resources and storage used by the viewer web tier. This file can be found in the sample folder at: <sample-folder-name>/WEB-INF/web.xml. This file is self-documenting, but a little information about the configuration options is given below.

<LinuxDocumentPath>

The sample pulls named documents from this location. The LinuxDocumentPath must have read/write permissions in order for the file drag and drop functionality of the splash page to work.

<LinuxImageStampPath>

The sample pulls image stamps from this location. Any valid image stamp in this folder will be available to the viewer for use as an image stamp. The LinuxImageStampPath must have read permissions.

<ValidImageStampTypes>

A comma separated value list of file extensions. These extensions specify the valid image stamp file types. Only images in the ImageStampPath with a valid file type will be available for use as an image stamp in the viewer.

<LinuxMarkupsPath>

Saved markup XML is kept in this folder. The LinuxMarkupsPath will be written to by the web server process, so it must have read/write permissions.

Configuration with web.xml for Windows

The file web.xml is used to configure the resources and storage used by the viewer web tier. This file can be found in each sample folder at: <sample-folder-name>/WEB-INF/web.xml. This file is self-documenting, but a little information about the configuration options is given below:

<DocumentPath>

The sample pulls named documents from this location. The DocumentPath must have read/write permissions in order for the file drag and drop functionality of the splash page to work.

<ImageStampPath>

The sample pulls image stamps from this location. Any valid image stamp in this folder will be available to the viewer for use as an image stamp. The ImageStampPath must have read permissions.

<ValidImageStampTypes>

A comma separated value list of file extensions. These extensions specify the valid image stamp file types. Only images in the ImageStampPath with a valid file type will be available for use as an image stamp in the viewer.

<MarkupsPath>

Saved markup XML is kept in this folder. The MarkupsPath will be written to by the web server process, so it must have read/write permissions.

<WebService[Scheme|Host|Port|Path|V2Path]>

Specifies how to connect with the PCC RESTful API.

 

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback